import { Result, Page } from './common';

interface Translate {
  appKey: string;
  cost: number;
  createTime: string;
  databagId: string;
  errorCode: string | null;
  fileId: number;
  name: string;
  outputFormat: string;
  projectId: string;
  reason: string | null;
  priority?: number;
  thumbnail?: string[];
}

interface TranslateBean extends Translate {
  compressed: boolean;
  config: {
    bimtilesVersion: string;
    toBimtiles: boolean;
  };
  estimatedCost: number | null;
  rootName: string;
  status: string;
}

interface TranslateDetail extends Translate {
  sourceId: string;
  length: number;
  shareToken: string;
  type: string;
  offlineDatabagStatus: string;
  supportOfflineDatabag: boolean;
  shareUrl: string;
  retry: boolean;
  status: string;
}

interface TranslateResponse extends Translate {
  sourceId: string;
  isFolder: boolean;
  length: number;
  shareToken: string;
  offlineDatabagStatus: string;
  shareUrl: string;
  status: string;
}

export interface TranslateBeanModel extends Result {
  data: TranslateBean;
}

export interface TranslateDetailModel extends Result {
  data: {
    page: Page;
    list: TranslateDetail[];
  };
}

export interface TranslateResponseModel extends Result {
  data: {
    pageSize: number;
    list: TranslateResponse[];
    searchAfter: Array<any>;
  };
}
